/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ticketmaster.presentation.clerk;

import java.awt.Font;
import java.util.Collection;
import javax.swing.JFrame;
import javax.swing.JPanel;
import ticketmaster.businessobject.CustomFont;
import ticketmaster.businessobject.LoginUser;
import ticketmaster.businessobject.ShoppingCart;
import ticketmaster.businessobject.User;
import ticketmaster.dataobject.BookedTicket;

/**
 *
 * @author Wei Liu
 */
public class ClerkBasePanel extends JPanel
{

    private User user; //this user is business object
    private ShoppingCart cart;
    private Collection<BookedTicket> bookedTickets;
    private JPanel pnlParent;
    private JFrame mainFrame;

    public ClerkBasePanel()
    {
        this.setSize(1100, 700);
    }

    /**
     * @return the user
     */
    public User getUser()
    {
        if (user == null)
        {
            user = LoginUser.getUser();
        }
        return user;
    }

    /**
     * @param user the user to set
     */
    public void setUser(User user)
    {
        this.user = user;
    }

    /**
     * @return the pnlParent
     */
    public JPanel getPnlParent()
    {
        return pnlParent;
    }

    /**
     * @param pnlParent the pnlParent to set
     */
    public void setPnlParent(JPanel pnlParent)
    {
        this.pnlParent = pnlParent;
    }

    /**
     * @return the customFont
     */
    public static Font getCustomFont()
    {
        return CustomFont.getCustomFont();
    }

    /**
     * @param aCustomFont the customFont to set
     */
    public static void setCustomFont(Font aCustomFont)
    {
        CustomFont.setCustomFont(aCustomFont);
    }

    /**
     * @return the cart
     */
    public ShoppingCart getCart()
    {
        if (cart == null)
        {
            cart = new ShoppingCart();
        }
        return cart;
    }

    /**
     * @param cart the cart to set
     */
    public void setCart(ShoppingCart cart)
    {
        this.cart = cart;
    }

    /**
     * @return the bookedTickets
     */
    public Collection<BookedTicket> getBookedTickets()
    {
        return bookedTickets;
    }

    /**
     * @param bookedTickets the bookedTickets to set
     */
    public void setBookedTickets(Collection<BookedTicket> bookedTickets)
    {
        this.bookedTickets = bookedTickets;
    }

    /**
     * @return the mainFrame
     */
    public JFrame getMainFrame()
    {
        return mainFrame;
    }

    /**
     * @param mainFrame the mainFrame to set
     */
    public void setMainFrame(JFrame mainFrame)
    {
        this.mainFrame = mainFrame;
    }
}
